<script setup lang="ts">
import Marker from "./Marker/index.vue";
import Polyline from "./Polyline/index.vue";
import Connection from "./Connection/index.vue";
import MarkerOnLine from "./MarkerOnLine/index.vue";
import PointDeviceLine from "./PointDevideLine/index.vue";
import { useMapStore } from "@/store";
import { MAP_ACTION } from "@/views/pipe-network/constants";
const mapStore = useMapStore();
const { mapAction } = storeToRefs(mapStore);
</script>

<template>
  <Marker v-if="mapAction === MAP_ACTION.ADD_POINT" />
  <Polyline v-if="mapAction === MAP_ACTION.ADD_PIPELINE" />
  <Connection v-if="mapAction === MAP_ACTION.CONNECTION_POINT_TWO" />
  <MarkerOnLine
    v-if="
      [MAP_ACTION.ADD_POINT_ONLINE, MAP_ACTION.DEVIDE_LINE_WITH_POINT].includes(
        mapAction
      )
    "
  />
    <PointDeviceLine v-if="mapAction === MAP_ACTION.DEVIDE_LINE_WITH_POINT" />
</template>

<style scoped lang="scss"></style>
